#!/bin/bash

echo "Setup loop0 to floppy.img..."
sudo losetup /dev/loop0 ./floppy.img && echo "...Done."
echo "Mount loop0..."
sudo mount /dev/loop0 /mnt && echo "...Done."
echo "Copy kernel to floppy.img..."
sudo cp src/kernel /mnt/kernel && echo "...Done."
echo "Umount loop0..."
sudo umount /dev/loop0 && echo "...Done."
echo "Uninstall loop0..."
sudo losetup -d /dev/loop0 && echo "...Done."
